import { createRouter, createWebHashHistory } from 'vue-router'
const Test = () => import('../view/Test.vue')
import Login from '../view/Login.vue'
import Backstage from '../view/backstage/Backstage.vue'

const routes = [
  { path: '/', component:()=>import('../view/home/HomePage.vue') },
  { path: '/test', component: Test },
  { path: '/login', component: Login },
  {
    path: '/backstage',
    component: Backstage,
    children: [
      { path: 'article', component: () => import('../view/backstage/Article.vue') },
      { path: 'category', component: () => import('../view/backstage/Category.vue') }
    ]
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export { router, routes }


